﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfModifyAgentDjackPwd.aspx.cs" Inherits="msBsc.WebUi.mMall.Public.mfModifyAgentDjackPwd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/public/mLogin.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,themes/wStyle1/js/comm/VerifyJs.js"
        type="text/javascript"></script>
    <script type="text/javascript">
        $(window).load(function () {
        });
        //        $(window).bind('resize', function () { _self._ResizeHandler(_self); })
        //        .bind('scroll', function () { _self._ResizeHandler(_self); });
    </script>
    <!--head fix rgn-->
    <style type="text/css">
        .cp_userName {
            font-family:微软雅黑;
            display:table-cell;
            width:80px;
            text-align:right;
        }
        .cp_user {
            font-family:微软雅黑;
            display:table-cell;
            text-align:left;
            color:#0a7fc6;
        }
        .btn {
            background: #0a7fc6 !important;
        }
        .SuccessItem {
            vertical-align: middle;
            margin: 0px 10px;
            width: 38px;
            height: 38px;
        }
    </style>
    <base target="_self" />
</head>
<body>
    <div class="viewport">
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(false) %>
        <form action='#' method="post" id="J_EmailForm">

            <div class="password_box" style="width: 100%;">
                <div class="password" style="width: 100%;">
                    <div id="change" class="kv_list">
                        <div class="c_input">
                            <div class="c_text">
                                <input type="password" value="" name="username" id="J_userpwd_input" placeholder="重置登录密码" />
                                <a class="input_pwd"></a>
                            </div>
                        </div>
                        <div class="c_input">
                            <div class="c_text">
                                <input type="password" value="" name="username" id="J_userOkPwd_input" placeholder="确认登录密码" />
                                <a class="input_pwd"></a>
                            </div>
                        </div>
                         <div>
                            <input type="button" class="btn btn-large btn_size" id="J_BtnEmailForm" onclick="changePassword()" value="确认修改" />
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <script type="text/javascript">
            (function () {
                $("#h_title").text("重置密码");
                $("#J_userpwd_input").val("");
                $("#J_userOkPwd_input").val("");
            })();

            function changePassword() {
                var password = $("#J_userpwd_input").val();
                if (!vfcPassword(password)) {
                    return;
                }
                var okPassword = $("#J_userOkPwd_input").val();
                if (!vfcOkPassword(password, okPassword)) {
                    return;
                }
                var opart = new jsonRow();
                opart.AddCell("ACTION", "doChangePassword");
                opart.AddCell("password", password);
                ajaxComm(opart);
            }

            //验证密码
            function vfcPassword(Password) {
                if (IsNull(Password)) {
                    alert("密码不能为空!");
                    return false;
                }
                if (!isStr(Password)) {
                    alert("密码只能是数字和字母组合!");
                    return false;
                }
                if (!islength(Password, 6, 16)) {
                    alert("密码长度只能在6~16为之间!");
                    return false;
                }
                return true;
            }

            //验证确认密码
            function vfcOkPassword(Password, ComfirPassword) {
                if (IsNull(ComfirPassword)) {
                    alert("确认密码不能为空！");
                    return false;
                }
                if (Password != ComfirPassword) {
                    alert("两次密码不一致!");
                    return false;
                }
                return true;
            }
        </script>
    </div>
</body>
<%=getBodyAfterJs() %>
</html>
